Repository navigation
ci: test against the latest MyGo release weekly - #135
Merged
Merged
Conversation
Add a mygo-latest workflow that runs every Monday and on workflow_dispatch, never on pull requests. It upgrades github.com/egoist/mygo to @latest (go get, go mod tidy), prints the resolved MyGo and Go versions, and runs go build, go vet and go test -race on the same ubuntu, macOS Intel, macOS arm64 and Windows runners as the test matrix. The setup-go cache is disabled so the run does not fill the cache key the test workflow restores with modules for a different MyGo version.
GitHub sends a failed scheduled run's notification to the user who last changed the cron line or re-enabled the workflow, not to the repository owner, and yldm-tech is an organization. Correct the header comment so it describes how a failure is seen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
go.mod pins MyGo v0.9.0 as the minimum version, and CI only tests that version. Minimum version selection means an application that also requires a newer MyGo builds Nodra against the newer one. This PR adds a scheduled workflow that upgrades MyGo to its latest release and runs build, vet and the race tests. An upstream change that breaks Nodra then shows up here before a consumer reports it.
What
New workflow
.github/workflows/mygo-latest.yml:workflow_dispatch. It does not run on pull requests, so a new MyGo release cannot block unrelated changes.permissions: contents: read,persist-credentials: false,GOWORK=off. It uses the same pinnedactions/checkoutandactions/setup-goSHAs astest.yml, withgo-version-file: go.mod.test.yml(ubuntu-latest, macos-26-intel, macos-26, windows-latest), withfail-fast: false.go get github.com/egoist/mygo@latestandgo mod tidywithGOTOOLCHAIN=auto. If a newer MyGo needs a newer Go, the job then fetches that toolchain the way an application would, instead of failing early. It prints the resolved MyGo and Go versions to the log and the job summary, then runsgo build ./...,go vet ./...andgo test -race ./....go.sum, so saving from this job would filltest.yml's cache with modules for a MyGo version thattest.ymldoes not use.The header comment explains who sees a failure. GitHub sends a failed scheduled run's notification to the person who last changed the workflow's cron schedule or re-enabled it, not to the yldm-tech organization. Whoever edits the schedule later takes over those alerts. The workflow does not open issues, because no other workflow in this repo does that.
test.ymlis unchanged.How tested
actionlint .github/workflows/*.yml: clean.go test ./...,go test -race -count=1 ./...,go vet ./...,go mod tidy -diff,golangci-lint run ./...: all pass.scripts/check-api.shagainst a fresh clone of main: passes.@latestresolves to the pinned version.Compatibility
Only CI changes. No Go code or exported API changes, and the
citype does not trigger a release.Trade-offs
test.yml's cache correct.Screenshots
None.